package com.intre.open.gwtjpa.data.first.server.spring;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.intre.open.gwtjpa.data.first.domain.Person;
import com.intre.open.gwtjpa.data.first.server.dao.DataFirstDAO;

@Transactional(value = "first", propagation = Propagation.REQUIRED)
public class DataFirstServiceSpring {

	public static final String FIRST_SERVICE_NAME = "dataFirstService";
	private static final long serialVersionUID = -707833153923495944L;
	
	private DataFirstDAO dao;

	public void setDao(DataFirstDAO dao) {
		this.dao = dao;
	}

	public DataFirstDAO getDao() {
		return this.dao;
	}

	@Transactional(value = "first", propagation = Propagation.SUPPORTS)
	public List<Person> loadAll() {
		return getDao().loadAll();
	}

	
}
